package com.pat.jrgwt.client;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.pat.jrgwt.shared.FuturesContractsAmountView;
import com.pat.jrgwt.shared.FuturesTradesAmountView;

public class ProfitLossesPor3View extends Composite
{
    
    public IndicesContractsTradesPor3View IndicesContractsTrades = new IndicesContractsTradesPor3View();
    
    public PerformanceDrawdownPor3View PerformanceDrawdown = new PerformanceDrawdownPor3View();

    private static class SingletonHolder
    {
        private static final ProfitLossesPor3View instance = new ProfitLossesPor3View();
    }
    
    public static ProfitLossesPor3View getInstance()
    {
        return SingletonHolder.instance;
    }
    
    private ProfitLossesPor3View()
    {
        VerticalPanel p = new VerticalPanel();
        
        ProfitLossesPipsPor3 pipsView = ProfitLossesPipsPor3.getInstance();
        pipsView.redrawFull();
        p.add(pipsView);
        
        FuturesTradesAmountView tradesAmountView = FuturesTradesAmountView.getInstance();
        tradesAmountView.redrawFull();
        p.add(tradesAmountView);

        FuturesContractsAmountView contractsAmountView = FuturesContractsAmountView.getInstance();
        contractsAmountView.redrawFull();
        p.add(contractsAmountView);
        
        p.add(IndicesContractsTrades);
        IndicesContractsTrades.redrawFull();
        
        p.add(PerformanceDrawdown);
        PerformanceDrawdown.redrawFull();
        
        initWidget(p);
    }
    
}
